﻿//----------------------------------------------
//            NGUI: Next-Gen UI kit
// Copyright © 2011-2012 Tasharen Entertainment
//----------------------------------------------

using UnityEngine;
using UnityEditor;
using System;

/// <summary>
/// Inspector class used to edit UITable.
/// </summary>

[CustomEditor(typeof(UITable))]
public class UITableInspector : Editor
{
	UITable table;
	
	void OnEnable()
	{
		table = target as UITable;	
	}
	
	public override void OnInspectorGUI ()
	{
		DrawDefaultInspector();
		
		if(GUILayout.Button("Reposition"))
		{
			table.Reposition(false);
		}
		
		if(GUILayout.Button("Reposition-RefrushChildren"))
		{
			table.Reposition(true);
		}
	}
}